package com.atguigu.springcloud.entities;


import lombok.Data;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Table;


@Data
@Entity
@Table(name = "ep_dept")
@EntityListeners(AuditingEntityListener.class)
public class Dept extends BaseEntity// entity --orm--- db_table
{
	/**
	 * 部门名称
	 */
	@Column(name = "d_name", nullable = false)
	private String 	dname;
	/**
	 * 部门人数
	 */
	private int count;


	@Override
	public String toString() {
		return "Dept{" +
				"dname='" + dname + '\'' +
				", count=" + count +
				'}' + super.toString();
	}
}
